\hypertarget{classyLib_1_1yConfig}{}\doxysection{y\+Lib\+::y\+Config Class Reference}
\label{classyLib_1_1yConfig}\index{yLib::yConfig@{yLib::yConfig}}


This is a tool to parse a cfg-\/file that is like c.  




{\ttfamily \#include $<$yconfig.\+hpp$>$}

Inheritance diagram for y\+Lib\+::y\+Config\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classyLib_1_1yConfig}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classyLib_1_1yConfig_ac9551c5ce0183bbfd92fc9ab05ff54ef}{y\+Config}} ()
\item 
\mbox{\hyperlink{classyLib_1_1yConfig_a9281679e3bd88192f89223d05aba12be}{$\sim$y\+Config}} ()
\item 
\mbox{\hyperlink{classyLib_1_1yConfig_ad2b115c227214b762f431824b9e19851}{y\+Config}} (const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&config\+\_\+)=delete
\begin{DoxyCompactList}\small\item\em copy constructor \end{DoxyCompactList}\item 
\mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \& \mbox{\hyperlink{classyLib_1_1yConfig_aaa543c4ccae607127eade86e8eeaa03e}{operator=}} (const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&config\+\_\+)=delete
\begin{DoxyCompactList}\small\item\em assignment func \end{DoxyCompactList}\item 
\mbox{\hyperlink{classyLib_1_1yConfig_a057d77e66c1121a8023bc905434770c7}{y\+Config}} (const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&\&config\+\_\+)=delete
\begin{DoxyCompactList}\small\item\em move constructor \end{DoxyCompactList}\item 
\mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \& \mbox{\hyperlink{classyLib_1_1yConfig_aa58607ff6fb45235cff11a09cc951b5c}{operator=}} (const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&\&config\+\_\+)=delete
\begin{DoxyCompactList}\small\item\em assignment func \end{DoxyCompactList}\item 
int8\+\_\+t \mbox{\hyperlink{classyLib_1_1yConfig_aa1cb8bb7d528ac2979aa7a2cbecac6e0}{Read\+File}} (const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&file\+\_\+path\+\_\+)
\begin{DoxyCompactList}\small\item\em read cfg-\/file from disk. \end{DoxyCompactList}\item 
int8\+\_\+t \mbox{\hyperlink{classyLib_1_1yConfig_a58efbd759e4f0240d8dcb7583f392421}{Write\+File}} (const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&file\+\_\+path\+\_\+)
\begin{DoxyCompactList}\small\item\em write cfg-\/file to disk. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}} \mbox{\hyperlink{classyLib_1_1yConfig_acde3da0df3be69fe498953c67cc1b03b}{Get\+Value}} (const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&node\+\_\+path\+\_\+)
\begin{DoxyCompactList}\small\item\em get value by node-\/path. \end{DoxyCompactList}\item 
int8\+\_\+t \mbox{\hyperlink{classyLib_1_1yConfig_a7002cc95e08e8c750651d15fc79951be}{Set\+Value}} (const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&node\+\_\+path\+\_\+, const \mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}} \&value\+\_\+)
\begin{DoxyCompactList}\small\item\em get value by node-\/path. \end{DoxyCompactList}\item 
int8\+\_\+t \mbox{\hyperlink{classyLib_1_1yConfig_a90bd8857e345191563d530f1acde5447}{Add\+Node}} (const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&pos\+\_\+, const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&name\+\_\+, \mbox{\hyperlink{classyLib_1_1yValue_ad30bf06e744fa772021a7cc4936e9be2}{y\+Value\+::y\+Value\+Type}} type\+\_\+, const \mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}} \&value\+\_\+=\mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}}())
\end{DoxyCompactItemize}
\doxysubsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
void $\ast$ \mbox{\hyperlink{classyLib_1_1yConfig_a9a01d2ffd41c92d76b682f68581273a1}{config\+\_\+instance}}
\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}


\doxysubsection{Detailed Description}
This is a tool to parse a cfg-\/file that is like c. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classyLib_1_1yConfig_ac9551c5ce0183bbfd92fc9ab05ff54ef}\label{classyLib_1_1yConfig_ac9551c5ce0183bbfd92fc9ab05ff54ef}} 
\index{yLib::yConfig@{yLib::yConfig}!yConfig@{yConfig}}
\index{yConfig@{yConfig}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{yConfig()}{yConfig()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily y\+Lib\+::y\+Config\+::y\+Config (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classyLib_1_1yConfig_a9281679e3bd88192f89223d05aba12be}\label{classyLib_1_1yConfig_a9281679e3bd88192f89223d05aba12be}} 
\index{yLib::yConfig@{yLib::yConfig}!````~yConfig@{$\sim$yConfig}}
\index{````~yConfig@{$\sim$yConfig}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{$\sim$yConfig()}{~yConfig()}}
{\footnotesize\ttfamily y\+Lib\+::y\+Config\+::$\sim$y\+Config (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classyLib_1_1yConfig_ad2b115c227214b762f431824b9e19851}\label{classyLib_1_1yConfig_ad2b115c227214b762f431824b9e19851}} 
\index{yLib::yConfig@{yLib::yConfig}!yConfig@{yConfig}}
\index{yConfig@{yConfig}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{yConfig()}{yConfig()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily y\+Lib\+::y\+Config\+::y\+Config (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&}]{config\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}}



copy constructor 


\begin{DoxyParams}{Parameters}
{\em config\+\_\+} & a exsited obj \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
this op is disable. 
\end{DoxyWarning}
\mbox{\Hypertarget{classyLib_1_1yConfig_a057d77e66c1121a8023bc905434770c7}\label{classyLib_1_1yConfig_a057d77e66c1121a8023bc905434770c7}} 
\index{yLib::yConfig@{yLib::yConfig}!yConfig@{yConfig}}
\index{yConfig@{yConfig}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{yConfig()}{yConfig()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily y\+Lib\+::y\+Config\+::y\+Config (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&\&}]{config\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}}



move constructor 


\begin{DoxyParams}{Parameters}
{\em config\+\_\+} & a exsited obj \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
this op is disable. 
\end{DoxyWarning}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classyLib_1_1yConfig_a90bd8857e345191563d530f1acde5447}\label{classyLib_1_1yConfig_a90bd8857e345191563d530f1acde5447}} 
\index{yLib::yConfig@{yLib::yConfig}!AddNode@{AddNode}}
\index{AddNode@{AddNode}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{AddNode()}{AddNode()}}
{\footnotesize\ttfamily int8\+\_\+t y\+Lib\+::y\+Config\+::\+Add\+Node (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&}]{pos\+\_\+,  }\item[{const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&}]{name\+\_\+,  }\item[{\mbox{\hyperlink{classyLib_1_1yValue_ad30bf06e744fa772021a7cc4936e9be2}{y\+Value\+::y\+Value\+Type}}}]{type\+\_\+,  }\item[{const \mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}} \&}]{value\+\_\+ = {\ttfamily \mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}}()} }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classyLib_1_1yConfig_acde3da0df3be69fe498953c67cc1b03b}\label{classyLib_1_1yConfig_acde3da0df3be69fe498953c67cc1b03b}} 
\index{yLib::yConfig@{yLib::yConfig}!GetValue@{GetValue}}
\index{GetValue@{GetValue}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{GetValue()}{GetValue()}}
{\footnotesize\ttfamily \mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}} y\+Lib\+::y\+Config\+::\+Get\+Value (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&}]{node\+\_\+path\+\_\+ }\end{DoxyParamCaption})}



get value by node-\/path. 


\begin{DoxyParams}{Parameters}
{\em node\+\_\+path\+\_\+} & the path of node. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the value of node-\/path. 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}

\end{DoxyWarning}
\mbox{\Hypertarget{classyLib_1_1yConfig_aa58607ff6fb45235cff11a09cc951b5c}\label{classyLib_1_1yConfig_aa58607ff6fb45235cff11a09cc951b5c}} 
\index{yLib::yConfig@{yLib::yConfig}!operator=@{operator=}}
\index{operator=@{operator=}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \& y\+Lib\+::y\+Config\+::operator= (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&\&}]{config\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}}



assignment func 


\begin{DoxyParams}{Parameters}
{\em config\+\_\+} & a exsited obj \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the obj of \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
this op is disable. 
\end{DoxyWarning}
\mbox{\Hypertarget{classyLib_1_1yConfig_aaa543c4ccae607127eade86e8eeaa03e}\label{classyLib_1_1yConfig_aaa543c4ccae607127eade86e8eeaa03e}} 
\index{yLib::yConfig@{yLib::yConfig}!operator=@{operator=}}
\index{operator=@{operator=}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \& y\+Lib\+::y\+Config\+::operator= (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} \&}]{config\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}}



assignment func 


\begin{DoxyParams}{Parameters}
{\em config\+\_\+} & a exsited obj \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the obj of \mbox{\hyperlink{classyLib_1_1yConfig}{y\+Config}} 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
this op is disable. 
\end{DoxyWarning}
\mbox{\Hypertarget{classyLib_1_1yConfig_aa1cb8bb7d528ac2979aa7a2cbecac6e0}\label{classyLib_1_1yConfig_aa1cb8bb7d528ac2979aa7a2cbecac6e0}} 
\index{yLib::yConfig@{yLib::yConfig}!ReadFile@{ReadFile}}
\index{ReadFile@{ReadFile}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{ReadFile()}{ReadFile()}}
{\footnotesize\ttfamily int8\+\_\+t y\+Lib\+::y\+Config\+::\+Read\+File (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&}]{file\+\_\+path\+\_\+ }\end{DoxyParamCaption})}



read cfg-\/file from disk. 


\begin{DoxyParams}{Parameters}
{\em file\+\_\+path\+\_\+} & the path of cfg-\/file \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the op status 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em 0} & ok. \\
\hline
{\em -\/1} & error. \\
\hline
\end{DoxyRetVals}
\begin{DoxyWarning}{Warning}

\end{DoxyWarning}
\mbox{\Hypertarget{classyLib_1_1yConfig_a7002cc95e08e8c750651d15fc79951be}\label{classyLib_1_1yConfig_a7002cc95e08e8c750651d15fc79951be}} 
\index{yLib::yConfig@{yLib::yConfig}!SetValue@{SetValue}}
\index{SetValue@{SetValue}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{SetValue()}{SetValue()}}
{\footnotesize\ttfamily int y\+Lib\+::y\+Config\+::\+Set\+Value (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&}]{node\+\_\+path\+\_\+,  }\item[{const \mbox{\hyperlink{classyLib_1_1yConfigValue}{y\+Config\+Value}} \&}]{value\+\_\+ }\end{DoxyParamCaption})}



get value by node-\/path. 


\begin{DoxyParams}{Parameters}
{\em node\+\_\+path\+\_\+} & the path of node. \\
\hline
{\em value\+\_\+} & the value to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the status of op. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em 0} & ok. \\
\hline
{\em -\/1} & error. \\
\hline
\end{DoxyRetVals}
\begin{DoxyWarning}{Warning}

\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em pos\+\_\+} & the position of node. \\
\hline
{\em name\+\_\+} & the name of node. \\
\hline
{\em type\+\_\+} & the type of value.\+we only support int32\+\_\+t/bool/float/std\mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{string}}/group. \\
\hline
{\em value\+\_\+} & the value to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the status of op. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em 0} & ok. \\
\hline
{\em -\/1} & error. \\
\hline
\end{DoxyRetVals}
\begin{DoxyWarning}{Warning}
if pos\+\_\+ == \textquotesingle{}.\textquotesingle{} or \char`\"{}\char`\"{}, we will add node to root 
\end{DoxyWarning}
\mbox{\Hypertarget{classyLib_1_1yConfig_a58efbd759e4f0240d8dcb7583f392421}\label{classyLib_1_1yConfig_a58efbd759e4f0240d8dcb7583f392421}} 
\index{yLib::yConfig@{yLib::yConfig}!WriteFile@{WriteFile}}
\index{WriteFile@{WriteFile}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{WriteFile()}{WriteFile()}}
{\footnotesize\ttfamily int8\+\_\+t y\+Lib\+::y\+Config\+::\+Write\+File (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{src_2CMakeLists_8txt_a296644e9ff1d0a602b4703f361406374}{std\+::string}} \&}]{file\+\_\+path\+\_\+ }\end{DoxyParamCaption})}



write cfg-\/file to disk. 


\begin{DoxyParams}{Parameters}
{\em file\+\_\+path\+\_\+} & the path of cfg-\/file \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the status of op. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em 0} & ok. \\
\hline
{\em -\/1} & error. \\
\hline
\end{DoxyRetVals}
\begin{DoxyWarning}{Warning}

\end{DoxyWarning}


\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classyLib_1_1yConfig_a9a01d2ffd41c92d76b682f68581273a1}\label{classyLib_1_1yConfig_a9a01d2ffd41c92d76b682f68581273a1}} 
\index{yLib::yConfig@{yLib::yConfig}!config\_instance@{config\_instance}}
\index{config\_instance@{config\_instance}!yLib::yConfig@{yLib::yConfig}}
\doxysubsubsection{\texorpdfstring{config\_instance}{config\_instance}}
{\footnotesize\ttfamily void$\ast$ y\+Lib\+::y\+Config\+::config\+\_\+instance\hspace{0.3cm}{\ttfamily [private]}}



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
/home/sky/y\+Lib/include/utility/\mbox{\hyperlink{yconfig_8hpp}{yconfig.\+hpp}}\item 
/home/sky/y\+Lib/src/utility/\mbox{\hyperlink{yconfig_8cpp}{yconfig.\+cpp}}\end{DoxyCompactItemize}
